<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		
		<link rel="stylesheet" type="text/css" href="../css/index%20(1).css" />
		<script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/vant.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/ajax.js" type="text/javascript" charset="utf-8"></script>
		<script src="html5plus://ready"></script>
		<title></title>
		<style type="text/css">
		
			#img>img {
				width: 70px;
				height: 70px;
				margin-top: 10px;
				margin-left: 10px;
				border-radius: 35px;
			}
			
			#span_right {
				margin-left: 20px;
			}
			
			#login {
				margin-top: 20px;
			}
			
			#one {
				background-color: red;
				height: 50px;
			}
			
			#two{
				background-color: white;
				margin-bottom: 15px;
				height: 70px;
				padding-top: 5px;
				
			}
			
			.van-nav-bar__title{
				color: white;
				font-size: 20px;
			}
			.van-nav-bar .van-icon{
				color: white;
			}
			.van-nav-bar__text{
				color: white;
			}
			#info{
				margin-top: 20px;
				padding-left: 180px;
			}
		</style>
	</head>

	<body>
		<div id="app">
			<van-row >
				<van-nav-bar
					  title="个人资料"
					  left-text="返回"
					  left-arrow
					id="one"
				@click-left="onClickLeft"
					/>
			</van-row>
			<van-row id="two">
			<van-col span="24" >
				
				<van-col span="6">
						<span id="img">
				 			<img src="../img/user.PNG"/>
					    </span>
				</van-col>
				<van-col span="18" id="info">
						<van-cell title="更换头像"  size="large" is-link  onclick="captureImage()" />
				</van-col>
					
				</van-col>
			</van-row>
			<van-row id="three">
				<van-col span="24" >
					<van-cell title="昵称" value=""   size="large" is-link url="#" />{{name}}
				</van-col>
				<van-col span="24" >
					<van-cell title="手机号码" value=""   size="large" is-link url="#" />{{phone}}
				</van-col>
				
			</van-row>
			
		</div>
		<script type="text/javascript">
			var name=localStorage.getItem("name");
			var phone=localStorage.getItem("phone");
			var app = new Vue({
				el: "#app",
				data: {

				},
				methods:{
					onClickLeft:function(){
						//window.location.href="..//views/user-views/users.html";
						plus.webview.open("index.html","lo");
					}
				}
			});
		</script>
		<script>
			function captureImage(){
							var cmr = plus.camera.getCamera();
							var res = cmr.supportedImageResolutions[0];
							var fmt = cmr.supportedImageFormats[0];
							//console.log("Resolution: "+res+", Format: "+fmt);
							cmr.captureImage( function( path ){
									alert( "Capture image success: " + path );
									
								},
								function( error ) {
									alert( "Capture image failed: " + error.message );
								},
								{resolution:res,format:fmt}
							);
			}
		</script>
	</body>

</html>